//
//  RequestManager.h
//  魔兽大数据
//
//  Created by 王右 on 2017/10/14.
//  Copyright © 2017年 王右. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CCJSONParse.h"
#import "AFNetworking.h"

@interface RequestManager : NSObject

+ (AFHTTPSessionManager*)afmanager;

/*
 *  model : 需要将后台数据映射成的对象
 */
+ (void)getRequestWithModule:(NSString *)module
                       param:(NSDictionary *)param
                       model:(NSString *)model
                     success:(void (^)(id obj))success
                     failure:(void (^)(NSString *error))failure;

+ (void)postRequestWithModule:(NSString *)module
                       param:(NSDictionary *)param
                       model:(NSString *)model
                     success:(void (^)(id obj))success
                     failure:(void (^)(NSString *error))failure;

+ (void)postNewRequestWithModule:(NSString *)module
                        param:(NSDictionary *)param
                        model:(NSString *)model
                      success:(void (^)(id obj))success
                      failure:(void (^)(NSString *error))failure;

+ (void)postRequestGetPhoneCodeWithPhone:(NSString *)phone
                                 success:(void (^)(id obj))success
                                 failure:(void (^)(NSString *error))failure;

+ (void)uploadImageWithImage:(UIImage *)image
                     success:(void (^)(id obj))success
                     failure:(void (^)(NSString *error))failure;



@end
